package com.zlm.user.emp.controller;

import com.zlm.common.base.BaseController;
import com.zlm.common.dto.JsonResultDto;
import com.zlm.common.entity.SysFeedbackDO;
import com.zlm.user.emp.service.SysFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 意见反馈控制器
 * @Author: duyufu
 * @Date: 2019/6/18 16:21
 */
@RequestMapping("/feedback")
@RestController
public class SysFeedbackController extends BaseController {

    @Autowired
    private SysFeedbackService sysFeedbackService;

    @PostMapping("/saveMemAgencyFavourite")
    public JsonResultDto saveMemAgencyFavourite(@RequestBody SysFeedbackDO feedback) {
        try {
            sysFeedbackService.saveMemAgencyFavourite(feedback);
            return success();
        } catch (Exception e) {
            e.printStackTrace();
            return fail(e.getMessage());
        }
    }
}
